<?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

defined('ANS') or die();

echo $Html->a(array(
	'text' => __('Only related elements'),
	'title' => $info['description'],
	'href' => path(true, $info['table'], 'related_with', $info['relation'], $info['id']),
	'class' => 'iframe button',
	'data-icon' => 'link'
));

echo $Html->a(array(
	'text' => __('All elements'),
	'title' => $info['description'],
	'href' => path(true, $info['table'], 'related_with', $info['relation'], $info['id']).get('all', true),
	'class' => 'iframe button',
	'data-icon' => 'search'
));

echo $Html->a(array(
	'text' => __('New'),
	'title' => __('Create new %s', $info['description']),
	'href' => path(true, $info['table'], 'new').get(array(
		'relation' => $info['relation'],
		'relation_id' => $info['id'],
		'redirect' => path(true, $info['table'], 'related_with', $info['relation'], $info['id'])
	)),
	'class' => 'iframe button',
	'data-icon' => 'plus'
));
?>
